{layout name="layout" /}
<!-- Main content -->

    <div class="box box-default">
        <div class="box-header with-border">
            {if condition="isset($data.mb_id)"}
            <h3 class="box-title">修改会员信息</h3>
            {else /}
            <h3 class="box-title">录入会员信息</h3>
            {/if}
        </div>
        <div class="row">
            <div class="col-xs-12">
                <form class="form-horizontal ingeAjax" method="post" action="{if condition=" isset($data.mb_id)
                "}{:url('home/Member/goedit','mb_id='.$data['mb_id'])}{else /}{:url('home/Member/goadd')}{/if}">
                <div class="space-2"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 短文本框： </label>
                    <div class="col-sm-10">
                        <input type="text" class="form-group-new  col-xs-12 col-sm-4" placeholder="短文本框" required/
                        name="mb_name" value="">
                        <span class="lbl col-xs-12 col-sm-4">&nbsp;&nbsp;<span class="red">*</span>必填</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 密码框： </label>
                    <div class="col-sm-10">
                        <input type="password" class="form-group-new  col-xs-12 col-sm-4" placeholder="密码框" required/
                        name="user_pwd">
                        <span class="lbl col-xs-12 col-sm-4">&nbsp;&nbsp;<span class="red">*</span>必填</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 随机数据： </label>
                    <div class="col-sm-10">
                        <input type="hidden" class="form-group-new  col-xs-12 col-sm-4" placeholder=""
                               value="{:inge_get_random_str(32);}" required/ name="user_pwd">
                        <span class="lbl col-xs-12 col-sm-4">&nbsp;&nbsp;<span class="red">*</span>必填</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 选择时间： </label>
                    <div class="col-sm-10">
                        <div class="input-group date col-xs-12 col-sm-4">
                            <div class="input-group-addon">
                                <i class="fa fa-calendar"></i>
                            </div>
                            <input type="text" class="form-control pull-right detailtime" name="staff_entry_time1"
                                   value="">
                        </div>
                        <span class="lbl col-xs-12 col-sm-4">&nbsp;&nbsp;<span class="blue">*</span>建议填写</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 选择日期： </label>
                    <div class="col-sm-10">
                        <div class="input-group date col-xs-12 col-sm-4">
                            <div class="input-group-addon">
                                <i class="fa fa-calendar"></i>
                            </div>
                            <input type="text" class="form-control pull-right onlyyearmonth" name="staff_entry_time1"
                                   value="">
                        </div>
                        <span class="lbl col-xs-12 col-sm-4">&nbsp;&nbsp;<span class="blue">*</span>建议填写</span>

                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 选择时间： </label>
                    <div class="col-sm-10">
                        <div class="input-group date col-xs-12 col-sm-4">
                            <div class="input-group-addon">
                                <i class="fa fa-calendar"></i>
                            </div>
                            <input type="text" class="form-control pull-right onlytime" name="staff_entry_time"
                                   value="">
                        </div>
                        <span class="lbl col-xs-12 col-sm-4">&nbsp;&nbsp;<span class="blue">*</span>建议填写</span>

                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 数字： </label>
                    <div class="col-sm-10">
                        <input type="number" class="form-group-new  col-xs-12 col-sm-4" placeholder="数字" name="mb_qq"
                               value="{$data2.mb_qq|default=''}">
                        <span class="lbl col-xs-12 col-sm-4">&nbsp;&nbsp;<span class="blue">*</span>建议填写</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 整数： </label>
                    <div class="col-sm-10">
                        <input type="text" class="form-group-new  col-xs-12 col-sm-4" placeholder="整数" name="mb_qq"
                               data-type="number" data-decimal="0" data-name="">
                        <span class="lbl col-xs-12 col-sm-4">&nbsp;&nbsp;<span class="blue">*</span>建议填写</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 金额： </label>
                    <div class="col-sm-10">
                        <div class="input-group col-xs-12 col-sm-4">
                            <input type="text" style="text-align:right;" class="form-group-new col-xs-12 col-sm-12"
                                   name="" data-type="number" data-decimal="2" data-name="" value="">
                            <div class="input-group-addon">
                                <i class="fa fa-rmb"></i>
                            </div>
                        </div>
                        <span class="lbl col-xs-12 col-sm-4">&nbsp;&nbsp;<span class="blue">*</span>建议填写</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 百分比： </label>
                    <div class="col-sm-10">
                        <div class="input-group col-xs-12 col-sm-4">
                            <input type="text" style="text-align:right;" class="form-group-new col-xs-12 col-sm-12"
                                   name="" data-type="number" data-decimal="5" data-name="" value="">
                            <div class="input-group-addon">
                                <i class="fa fa-percent"></i>
                            </div>
                        </div>
                        <span class="lbl col-xs-12 col-sm-4">&nbsp;&nbsp;<span class="blue">*</span>建议填写</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 邮箱： </label>
                    <div class="col-sm-10">
                        <div class="input-group col-xs-12 col-sm-4">
                            <input type="email" class="form-group-new col-xs-12 col-sm-12" data-type="email" value="">

                        </div>
                        <span class="lbl col-xs-12 col-sm-4">&nbsp;&nbsp;<span class="blue">*</span>建议填写</span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 单选按钮： </label>
                    <div class="col-sm-3">
                        <input type="radio" class="flat-blue" name="mb_sex" checked value="0">保密
                        <input type="radio" class="flat-blue" name="mb_sex" value="1">男
                        <input type="radio" class="flat-blue" name="mb_sex" value="2">女
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 多选按钮： </label>
                    <div class="col-sm-3">
                        <input type="checkbox" class="flat-blue" name="mb_sex" checked value="0">保密
                        <input type="checkbox" class="flat-blue" name="mb_sex" value="1">男
                        <input type="checkbox" class="flat-blue" name="mb_sex" value="2">女
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 下拉框:</label>
                    <div class="col-sm-10">
                        <select name="menu_pid" class="select2 form-group-new  col-xs-12 col-sm-4">
                            <option value="0">作为顶级菜单</option>
                            <option value="1">测试</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 下拉框（多选）:</label>
                    <div class="col-sm-10">
                        <select name="menu_pid" data-max='2' multiple="multiple"
                                class="select2_ form-group-new  col-xs-12 col-sm-4">
                            <option value="0">作为顶级菜单</option>
                            <option value="1">测试</option>
                            <option value="13">测试</option>
                            <option value="14">测试</option>
                            <option value="15">测试</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    {if condition="isset($data.mb_id)"}
                    <!-- <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 首充金额： </label> -->
                    <div class="col-sm-10">
                        <input type="hidden" class="form-group-new  col-xs-12 col-sm-4" placeholder="首充金额"
                               name="mb_money" value="{$data2.mb_money|default=''}">
                        <!-- <span class="lbl col-xs-12 col-sm-4">&nbsp;&nbsp;<span class="blue">*</span>建议填写</span> -->
                        {else /}
                        <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 首充金额： </label>
                        <div class="col-sm-10">
                            <input type="text" class="form-group-new  col-xs-12 col-sm-4" placeholder="首充金额"
                                   name="mb_money" value="{$data2.mb_money|default=''}">
                            <span class="lbl col-xs-12 col-sm-4">&nbsp;&nbsp;<span class="blue">*</span>建议填写</span>
                            {/if}
                        </div>
                    </div>
                    <!--//umeditor 按需加载-->
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> ueditor-Mini:</label>
                        <div class="col-sm-10">
                            <script type="text/plain" id="umEditor" style="width:90%;height:360px;">
                        <p>提示</p>

                            </script>
                        </div>
                    </div>
                    <!--//ueditor 按需加载-->
                    <div class="form-group">
                        <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> ueditor:</label>
                        <div class="col-sm-10">
                            <script id="uEditor" type="text/plain" style="width:95%;height:360px;"></script>
                        </div>
                    </div>
                    <div class="form-actions">
                        <div class="col-md-offset-3 col-md-9">
                            <button class="btn btn-primary" type="submit">
                                <i class="fa fa-check bigger-110"></i> 保存
                            </button>
                            &nbsp; &nbsp; &nbsp;
                            {if condition="isset($data.mb_id)"}
                            <button class="btn" type="reset" onclick="history.go(-1);">
                                <i class="fa fa-undo bigger-110"></i> 返回
                            </button>
                            {else /}
                            <button class="btn" type="reset">
                                <i class="fa fa-undo bigger-110"></i> 重置
                            </button>
                            {/if}
                        </div>
                    </div>
                    <script type="text/plain" id="upload_ue"></script>

                    调用的页面：
                    <input type="text" id="picture" name="cover" /><a href="javascript:void(0);" onclick="upImage();">上传图片</a>
                    <input type="text" id="file" /><a href="javascript:void(0);" onclick="upFiles();">上传文件</a>
                    <div class="space"></div>
                    </form>
                </div>
            </div>
        </div>
        <!-- /.row -->
</section>
{include file="public/base" /} {include file="public/edit" /} {include file="public/footer" /}
<link href="/static/plugins/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
<script type="text/javascript" charset="utf-8" src="/static/plugins/umeditor/umeditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/plugins/umeditor/umeditor.min.js"></script>
<script type="text/javascript" src="/static/plugins/umeditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
    var um = UM.getEditor('umEditor');
</script>
<script type="text/javascript" charset="utf-8" src="/static/plugins/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/plugins/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/static/plugins/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
    var ue = UE.getEditor('uEditor');
</script>
<script type="text/javascript">

    var _editor;
    $(function() {

//重新实例化一个编辑器，防止在上面的editor编辑器中显示上传的图片或者文件
        _editor = UE.getEditor('upload_ue');
        _editor.ready(function () {
//设置编辑器不可用
            _editor.setDisabled();
//隐藏编辑器，因为不会用到这个编辑器实例，所以要隐藏
            _editor.hide();
//侦听图片上传
            _editor.addListener('beforeInsertImage', function (t, arg) {
//将地址赋值给相应的input,只去第一张图片的路径
                $("#picture").attr("value", arg[0].src);
//图片预览
                $("#preview").attr("src", arg[0].src);
            })
//侦听文件上传，取上传文件列表中第一个上传的文件的路径
            _editor.addListener('afterUpfile', function (t, arg) {
//                console.log(_editor.options);
                $("#file").attr("value", arg[0].url);
            })
        });
    });
    //弹出图片上传的对话框
    function upImage() {
        var myImage = _editor.getDialog("insertimage");

        myImage.open();
    }
    //弹出文件上传的对话框
    function upFiles() {
        var myFiles = _editor.getDialog("attachment");
        myFiles.open();
    }
</script>
</body>

</html>
